package by.ins.app.commands.ins;

import org.apache.log4j.Logger;

import by.ins.life.IData;
import by.ins.life.INuclear;
import by.ins.life.ISet;
import by.ins.life.simpleimpl.LifeEvolutor;
import by.yativem.commons.task.AbstractCallableTaskCommand;

public class InsSolveCommand extends AbstractCallableTaskCommand<IData<INuclear>, LifeEvolutor > {
	
	private static final long serialVersionUID = 1L;

	private static final Logger log = Logger.getLogger(InsSolveCommand.class);
	
	private IData<?> input;
	
	public InsSolveCommand(IData<?> input){
		this.input = input;
	}
	
	@Override
	protected IData<INuclear> doCommand() throws Exception {
		ISet<?> set =  task.getLife().getSet();
		IData<INuclear> result =  task.getSolver().solve( set, input);
		
		return result;
	}
}
